<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>用户基地可做任务</title>
<@fm.header />
<script type="text/javascript" src="/resources/js/easyui/datagrid-detailview.js"></script>
<script>
function doSearch(){    
    $('#tt').datagrid('load', {    
        sdkVer: $('#sdkVer').val(),
        startTime: $('#startTime').datetimebox('getValue').replace(/-/g,''),
        endTime: $('#endTime').datetimebox('getValue').replace(/-/g,''),
        base: $('#base').combobox('getValue')
    });
}
$(function(){
    $('#tt').datagrid({
        view: detailview,
        detailFormatter:function(index,row){
            return '<div class="ddv" style="padding:5px 0"></div>';
        },
        onExpandRow: function(index,row){
            var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
            ddv.panel({
                border:false,
                cache:false,
                href:'/userBaseCanDoLog/getCanDoDetail?id='+row.id+'&base='+$('#base').combobox('getValue'),
                onLoad:function(){
                    $('#tt').datagrid('fixDetailRowHeight',index);
                }
            });
            $('#tt').datagrid('fixDetailRowHeight',index);
        }
    });
});
</script>
</head>
<body class="cmp-list-body">
<div id="tb" style="padding:3px">
 	<span>sdk版本号:</span>
    <input id="sdkVer" style="line-height:20px;border:1px solid #ccc">
    <span>日期:</span>
    <input type="text" class="easyui-datebox" id="startTime" />至
    <input type="text" class="easyui-datebox" id="endTime" />
         基地 
		            <input id="base" class="easyui-combobox" style="width: 155px;" name="base" data-options="
						required:true,
						url:'/base/content?defaultValues=${config.base}',
						method:'get',
						valueField:'id',
						textField:'baseName'" />
	    	
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a>
</div>
<table id="tt" class="easyui-datagrid" title="用户请求数据日志 " toolbar="#tb" rownumbers="true" 
    url="/userBaseCanDoLog/getListPage" 
	singleSelect="true" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
		    <th align="center" width="12%" field="id" hidden="true"></th>
		    <th align="center" width="12%" field="rd">日期</th>
		    <th align="center" width="12%" field="sdkVer">版本号</th>
		    <th align="center" width="12%" field="total">可做任务数</th>
		    <th align="center" width="10%" field="createTime">创建时间</th>
		    <th align="center" width="10%" field="modifyTime">修改时间</th>
        </tr>
    </thead>   
</table>

</body>
</html>